import QtQuick 2.0
import QtQuick.Layouts 1.14

Item {
    id:root
    property string  pageColor : '#CECDCD'          // 页面背景颜色
    property string  recSelectColor: '#1989FA'  // A3 A4 A5 A6 被点击选择切换的颜色
    property int  selectInx : clothStyleObj.sizeStyle   // A3 A4 A5 A6 被选择的序号

    ColumnLayout{
       anchors.fill: parent
       Rectangle{
          Layout.fillHeight: true
          Layout.fillWidth: true
          visible: root.selectInx === 0
          color: root.recSelectColor
       }

       Rectangle{
           Layout.fillHeight: true
           Layout.fillWidth: true
           visible: root.selectInx === 1

           Rectangle{
               width: parent.height / 2
               height: parent.width
               color: root.recSelectColor
               anchors.centerIn: parent
           }
       }

       Rectangle{
           Layout.fillHeight: true
           Layout.fillWidth: true
           visible: root.selectInx === 2

           GridLayout{
                id:clothStyle
                anchors.fill: parent
                columnSpacing: 0
                rowSpacing: 0
                columns:2
                rows:2

                Repeater{
                    id: myRepeater
                    model: 4
                    Rectangle{
                        Layout.fillHeight: true
                        Layout.fillWidth: true
                        color: index == 1 ? root.recSelectColor : "white"
                    }
                }
           }
       }

       Rectangle{
           Layout.fillHeight: true
           Layout.fillWidth: true
           visible: root.selectInx === 3

           GridLayout{
                anchors.fill: parent
                columnSpacing: 0
                rowSpacing: 0
                columns:3
                rows:3

                Repeater{
                    id: myRepeater1
                    model: 9
                    Rectangle{
                        Layout.fillHeight: true
                        Layout.fillWidth: true
                        color: index == 2 ? root.recSelectColor : "white"
                    }
                }
           }
       }
    }
}
